$(document).ready(function(){
	document.onclick = function (event){
        var e = event || window.event;
        var elem = e.srcElement||e.target;
        while(elem){
            if(elem.id == "more"){
				return;
			}
			
			elem = elem.parentNode;
        }  
        //隐藏account下拉菜单  
		$('.more').animate({
			marginLeft: '0px'
		}, 500,function(){
			$(this).removeClass('moreClose');
		});
    }
	
	$('.navBarList').click(function(){
		//alert($(this).attr('rel'))
		
		//如果点击的是current导航直接无视
		if( $(this).children('.navBarStation').hasClass('navOn') ){
			return false;
		}
		
		//切换显示导航条底部 current 标识
		$('.navBarStation').removeClass('navOn');
		$(this).children('.navBarStation').addClass('navOn');
		
	});
	
	//more
	$('.more').click(function(){
		if( $(this).css('margin-left') == '0px' ){
			$(this).animate({
				marginLeft: '100px'
			}, 500,function(){
				$(this).addClass('moreClose');
			});
			
		}else{
			$(this).animate({
				marginLeft: '0px'
			}, 500,function(){
				$(this).removeClass('moreClose');
			});
		}
			
	});
});
